<%--
  Created by IntelliJ IDEA.
  User: koizumisinya
  Date: 2017/12/08
  Time: 18:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>Register</title>
    <script type="text/javascript">
        function changeVerifyCode() {
            var verifyImg = document.getElementById("verify_code");
            //verifyImg.src = "/RegisterSystem/verifyCodeServlet?time=" + new Date().getTime();
            verifyImg.src = "<c:url value='/verifyCodeServlet'/>?time=" + new Date().getTime();
        }
    </script>
</head>
<body>
<h1>注册</h1>
<p style="color:red; font-weight:900">${error_msg}</p>

<form action="/RegisterSystem/registerServlet" method="post">
    用户名:<input type="text" name="username" id="username"
               value="${user_msg.username}"/>${error_map.username}<br/>
    密码:<input type="password" name="password" id="password"
              value="${user_msg.password}"/>${error_map.password}<br/>
    验证码: <input type="text" name="verifyCode" value="${user_msg.verifyCode}" size="4"/>
    <img id="verify_code" src="<c:url value='/verifyCodeServlet'/>" border="2"/>
    <a href="javascript:changeVerifyCode();">看不清换一张</a>${error_map.verify_code}<br/>

    <input type="submit" name="register" id="register" value="注册"/>
</form>

<a href="/RegisterSystem/login.jsp"> 已有账号 直接登录</a>

</body>
</html>
